<layout name='layout' />

<div class="admin-main">
	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		<legend>投票设置</legend>
	</fieldset>

	<form id="ajaxForm" class="layui-form" method="post" action="<{:U('Vote/setting')}>">
		
		<div class="layui-form-item">
			<label class="layui-form-label">IP限制</label>
			<div class="layui-inline">
				<select name="restrictIP" id="restrictIP" lay-verify="required">
					<option value="1">是</option>
					<option value="0">否</option>
				</select>								
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">投票间隔</label>
			<div class="layui-inline">
				<select name="restrictTime" id="restrictTime" lay-verify="required">
					<option value="1">1小时</option>
					<option value="6">6小时</option>
					<option value="12">12小时</option>
					<option value="24">24小时</option>
				</select>							
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">查看结果</label>
			<div class="layui-inline">
				<select name="canView" id="canView" lay-verify="required">
					<option value="1">允许</option>
					<option value="0">禁止</option>
				</select>							
			</div>
		</div>	

		<div class="layui-form-item">
			<div class="layui-input-block">
				<button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
			</div>
		</div>
		<input type="hidden" name="id" value="<{$list['id']}>" />
	</form>
</div>
<script type="text/javascript">
$("#restrictIP").val("<{$list['restrictIP']}>");
$("#restrictTime").val("<{$list['restrictTime']}>");
$("#canView").val("<{$list['canView']}>");
</script>